package com.example.menu;

import android.graphics.Color;

public class ColorClass {
	int currentColorInt; // color that was pressed
	
	int nextColorInt;     // color that should be pressed
	int colorOfNextColor; // is the color that the text is going to be printed out on
	String nextColorString; // this is nextColorInt in string format
	
	public ColorClass () {
	
	}
	
	/* Call this when a button is pressed */
	public boolean check () {
		if (currentColorInt == nextColorInt) return true;
		else return false;
	}
	
	public void update_nextColor () {		
		switch ((int) (Math.random() * 4)) {
			case 0:  
				nextColorString = "Red"; 
				nextColorInt = Color.RED;
				break;
			case 1:  
				nextColorString = "Blue";
				nextColorInt = Color.BLUE;
				break;
			case 2:  
				nextColorString = "Yellow";
				nextColorInt = Color.YELLOW;
				break;
			case 3:  
				nextColorString = "Green"; 
				nextColorInt = Color.GREEN;
				break;
		}		
	}
	
	public void update_colorOfNextColor () {
		switch ((int) (Math.random() * 4)) {
		case 0:  
			colorOfNextColor = Color.RED;
			break;
		case 1:  
			colorOfNextColor = Color.BLUE;
			break;
		case 2:  
			colorOfNextColor = Color.YELLOW;
			break;
		case 3:  
			colorOfNextColor = Color.GREEN;
			break;
		}			
	}	
	
	public void update () {
		update_nextColor();
		update_colorOfNextColor ();
	}
		
		
		
	
	
}
